<!DOCTYPE html>
<html style="overflow-x:auto;overflow-y:auto;">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>JAVIS电商用户行为分析与可视化平台</title>
	<script src="/static/manager/jquery-1.8.3.min.js" type="text/javascript"></script>
	<link href="/static/manager/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/bootstrap.min.js" type="text/javascript"></script>
	<link href="/static/manager/jeesite.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/jeesite.js" type="text/javascript"></script>
	<script type="text/javascript">var ctx = '../a', ctxStatic='../static';</script>
	<script>var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="//hm.baidu.com/hm.js?82116c626a8d504a5c0675073362ef6f";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s);})();</script>
	<meta name="decorator" content="default">
	<script type="text/javascript">
		$(document).ready(function() {
			$("#importSubmit").click(function(){
				document.location.href = "/manager/importMember/";
			});
		});

		function deleteMember(id){
			let r = confirm('确认要删除该条记录吗？');
			if(r == true){
				$.get("/manager/deleteMember/"+id, "json", function(data){
					if(data['msg'] == 'success'){
						alert("删除成功！");
						document.location.href="/manager/memberList/";
					}else{
						alert(data['msg']);
					}
				});

			}
		}

		function updateMember(id){
			document.location.href="/manager/updateMember/"+id;
		}
	</script>
</head>
<body>

	<ul class="nav nav-tabs">
		<li class="active"><a href="/manager/memberList/">会员列表信息</a></li>
	</ul>
	<form id="searchForm" class="breadcrumb form-search" action="/manager/memberList/" method="post">
		<ul class="ul-form">
			<li><label>会员账号：</label>
				<input id="account" name="account" class="input-medium" type="text" value="" maxlength="100">
			</li>
			<li><label>手机号码：</label>
				<input id="phone" name="phone" class="input-medium" type="text" value="" maxlength="100">
			</li>
			<li><label>会员类型：</label>
				<select name="type" htmlescape="false" maxlength="2" class="input-xlarge  select2-offscreen" tabindex="-1">
					<option value="">请选择</option>
					<option value="0">新增会员</option>
					<option value="1">领卡会员</option>
					<option value="2">消费会员</option>
				</select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"></li>
			<li class="btns"><input id="importSubmit" class="btn btn-primary" type="button" value="导入"></li>
			<li class="clearfix"></li>
		</ul>
	</form>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>编号</th>
				<th>会员名称</th>
				<th>会员性别</th>
				<th>出生年月</th>
				<th>手机号码</th>
				<th>电子邮件</th>
				<th>会员类型</th>
				<th>注册时间</th>
				<th>真实姓名</th>
				<th>会员省份</th>
				<th>会员城市</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		{% for member in objects %}
			<tr>
				<td><a href="/manager/updateMember/{{member.id}}">
					{{member.id}}
				</a></td>
				<td>
					{{member.account}}
				</td>
				<td>
					{% if member.gender == 0 %}
						男
					{%else%}
						女
					{% endif %}
				</td>
				<td>
					{{member.birthday}}
				</td>
				<td>
					{{member.phone}}
				</td>
				<td>
					{{member.email}}
				</td>

				<td>
					{{member.type}}
				</td>
				<td>
					{% if member.registerTime == None%}
						&nbsp;
					{%else%}
						{{member.registerTime}}
					{% endif %}
				</td>

				<td>
                	{{ member.realName}}
            	</td>
				<td>
					{{member.province}}
				</td>
				<td>
					{{ member.city}}
				</td>

				<td>
    				<a href="javascript:void(0)" onclick="updateMember({{member.id}})">修改</a>
					<a href="javascript:void(0)" onclick="deleteMember({{member.id}})">删除</a>
				</td>
			</tr>
		{% endfor %}

		</tbody>
	</table>
	<div class="pagination">
		<ul>
			<li class="active">
				<a class="left" href="?page=1"> 首页 </a>
			</li>
			<!--上一页-->
			{% if objects.has_previous %}
			<li class="active">
				<a class="left" href="?page={{ objects.previous_page_number }}">« 上一页</a>
			</li>
			{% else %}
				<li class="disabled">
					<a class="left" href="javascript:void(0)">« 上一页</a>
				</li>
			{% endif %}

			<!-- 下一页 -->
			{% if objects.has_next %}
			<li class="active">
				<a class="right" href="?page={{ objects.next_page_number }}">下一页 »</a>
			</li>
			{% else %}
				<li class="disabled"><a href="javascript:void(0)">下一页 »</a></li>
			{% endif %}
			<li class="active">
				<a class="right" href="?page={{ paginator.num_pages }}"> 尾页 </a>
			</li>
			<li class="disabled controls"><a href="javascript:void(0)">当前 <input type="text" value="{{page}}" > / <input type="text" value="{{pageSize}}"> 条，共 {{total}} 条</a></li>
		</ul>
		<div style="clear:both;"></div>
	</div>

	<script type="text/javascript">//<!-- 无框架时，左上角显示菜单图标按钮。
		if(!(self.frameElement && self.frameElement.tagName=="IFRAME")){
			$("body").prepend("<i id=\"btnMenu\" class=\"icon-th-list\" style=\"cursor:pointer;float:right;margin:10px;\"></i><div id=\"menuContent\"></div>");
			$("#btnMenu").click(function(){
				top.$.jBox('get:/jeesite/a/sys/menu/treeselect;JSESSIONID=3baf732ded45486a8f110d13601a4c9b', {title:'选择菜单', buttons:{'关闭':true}, width:300, height: 350, top:10});
				//if ($("#menuContent").html()==""){$.get("/jeesite/a/sys/menu/treeselect", function(data){$("#menuContent").html(data);});}else{$("#menuContent").toggle(100);}
			});
		}//-->
	</script>

</body></html>